<?php
/**
 * @package     Celtawebtickets component
 * @copyright   Copyright (C) 2012 CMExt Team http://www.cmext.vn/
 * @license     http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
 */

// No direct access
defined('_JEXEC') or die;

JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
?>
<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
		if (task == 'mailtemplate.cancel' || document.formvalidator.isValid(document.id('mailtemplate-form'))) {
			Joomla.submitform(task, document.getElementById('mailtemplate-form'));
		}
		else {
			alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
		}
	}
</script>

<form action="<?php echo JRoute::_('index.php?option=com_celtawebtickets&layout=edit&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="mailtemplate-form" class="form-validate">
	<div class="width-100 fltlft">
		<fieldset class="adminform">
			<ul class="adminformlist">
				<li><?php echo $this->form->getLabel('name'); ?>
				<?php echo $this->form->getInput('name'); ?></li>
                                <li><?php echo $this->form->getLabel('alias'); ?>
				<?php echo $this->form->getInput('alias'); ?></li>
                                
				<li><?php echo $this->form->getLabel('language'); ?>
				<?php echo $this->form->getInput('language'); ?></li>
                
				<li><?php echo $this->form->getLabel('subject'); ?>
				<?php echo $this->form->getInput('subject'); ?></li>

				<li><?php echo $this->form->getLabel('body'); ?><div class="clr"></div>
				<?php echo $this->form->getInput('body'); ?></li>
                
				<li><?php echo $this->form->getLabel('id'); ?>
				<?php echo $this->form->getInput('id'); ?></li>                
			</ul>
            <div class="clr"></div>
            <?php echo JText::_('COM_CELTAWEBTICKETS_MAIL_TEMPLATE_VARIABLE_INSTRUCTION'); ?>
		</fieldset>
        
		<input type="hidden" name="task" value="" />
		<?php echo JHtml::_('form.token'); ?>        
	</div>
</form>
<div class="clr"></div>
